<!DOCTYPE HTML>

<html>
<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <title>${item.name}</title>
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <meta name="description" content="${item.name}" />
    <meta name="keywords" content="${item.name}" />

    <!-- Animate.css -->
    <link rel="stylesheet" href="/static/front/css/animate.css">
    <!-- Icomoon Icon Fonts-->
    <link rel="stylesheet" href="/static/front/css/icomoon.css">
    <!-- Bootstrap  -->
    <link rel="stylesheet" href="/static/front/css/bootstrap.css">

    <!-- Magnific Popup -->
    <link rel="stylesheet" href="/static/front/css/magnific-popup.css">

    <!-- Theme style  -->
    <link rel="stylesheet" href="/static/front/css/style.css">

    <!-- Modernizr JS -->
    <script src="/static/front/js/modernizr-2.6.2.min.js"></script>
    <script type="text/javascript" charset="utf-8" src="//g.alicdn.com/sd/ncpc/nc.js?t=2015052012"></script>

    <!-- FOR IE9 below -->
    <!--[if lt IE 9]>
    <script src="/static/front/js/respond.min.js"></script>
    <![endif]-->
    <script type="text/javascript" src="http://api.map.baidu.com/api?v=2.0&ak=BZ8GAdHiC1wkmm32aILp7cRf"></script>
    <style type="text/css">
        #l-map{height:500px;width:100%;}
        #r-result{display: none}

        .nc_scale{
            height:32px;
        }
    </style>

</head>
<body>

<div class="fh5co-loader"></div>

<div id="page">
    @include("/common/front/_nav.html"){}

    <header id="fh5co-header" class="fh5co-cover fh5co-cover-sm" role="banner" style="background-image:url(http://eef2018.tkgc.net/kaptcha/7e8e6762-16b2-4160-9cd8-6d732e980c3d.jpg);">
        <div class="overlay"></div>
        <div class="container">
            <div class="row">
                <div class="col-md-7 text-left">
                    <div class="display-t">
                        <div class="display-tc animate-box" data-animate-effect="fadeInUp">
                            <h1 class="mb30">${article.title}</h1>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </header>


    <div id="fh5co-contact">
        <div class="container">
            <!-- 模态框（Modal） -->
            <div class="modal fade" id="myModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
                <div class="modal-dialog">
                    <div class="modal-content">
                        <div class="modal-header">
                            <button type="button" class="close" data-dismiss="modal" aria-hidden="true">
                                &times;
                            </button>
                            <h4 class="modal-title" id="myModalLabel">
                                请验证报名手机号信息
                            </h4>
                        </div>
                        <div class="modal-body" id="myModalContent">
                            <div class="col-md-6 form-group" style="float: inherit;">
                                <label for="name">手机号码：</label>
                                <input type="text" id="codetel" name="codetel" class="form-control" required="required" placeholder="请填写手机号码...">
                            </div>
                            <div class="col-md-6 form-group" style="float: inherit;">
                                <div id="your-dom-id" class="nc-container" ></div> <!--No-Captcha渲染的位置，其中 class 中必须包含 nc-container-->
                            </div>
                            <div class="col-md-6 form-group" style="float: inherit;">
                                <label for="name">验证码：</label>
                                <input type="text" id="code" name="code"  class="form-control" required="required" placeholder="请填写手机验证码...">
                            </div>
                            <div class="col-md-6 form-group"  style="float: inherit;">
                                <input type="button" value="立即查询" onclick="modify()" class="btn btn-lg btn-primary">
                            </div>

                            <script type="text/javascript">
                                function modify(){
                                    window.location.href="/front/registration/modify?tel="+$("#codetel").val()+"&code="+$("#code").val();
                                }

                                function IsPC() {
                                    var userAgentInfo = navigator.userAgent;
                                    var Agents = ["Android", "iPhone",
                                        "SymbianOS", "Windows Phone",
                                        "iPad", "iPod"];
                                    var flag = true;
                                    for (var v = 0; v < Agents.length; v++) {
                                        if (userAgentInfo.indexOf(Agents[v]) > 0) {
                                            flag = false;
                                            break;
                                        }
                                    }
                                    return flag;
                                }

                                var nc_token = ["FFFF0N00000000006BFE", (new Date()).getTime(), Math.random()].join(':');
                                var NC_Opt = {
                                    renderTo: "#your-dom-id",
                                    appkey: "FFFF0N00000000006BFE",
                                    scene: "nc_message",
                                    token: nc_token,
                                    customWidth: 260,
                                    trans: {"key1": "code0"},
                                    elementID: ["usernameID"],
                                    is_Opt: 0,
                                    language: "cn",
                                    isEnabled: true,
                                    timeout: 3000,
                                    times: 5,
                                    apimap: {
                                        // 'analyze': '//a.com/nocaptcha/analyze.jsonp',
                                        // 'get_captcha': '//b.com/get_captcha/ver3',
                                        // 'get_captcha': '//pin3.aliyun.com/get_captcha/ver3'
                                        // 'get_img': '//c.com/get_img',
                                        // 'checkcode': '//d.com/captcha/checkcode.jsonp',
                                        // 'umid_Url': '//e.com/security/umscript/3.2.1/um.js',
                                        // 'uab_Url': '//aeu.alicdn.com/js/uac/909.js',
                                        // 'umid_serUrl': 'https://g.com/service/um.json'
                                    },
                                    callback: function (data) {
                                        $.ajax({
                                            url: "/front/registration/code",
                                            async: false,
                                            data: {
                                                "token": nc_token,
                                                "session": data.csessionid,
                                                "sig": data.sig,
                                                "tel": $("#codetel").val(),
                                                "scene": NC_Opt.scene
                                            }
                                        });
                                    }
                                };
                                if(IsPC()) {
                                    NC_Opt.scene = "nc_message";
                                }else {
                                    NC_Opt.scene = "nc_message_h5";
                                }
                                var nc = new noCaptcha(NC_Opt);
                                nc.upLang('cn', {
                                    _startTEXT: "请按住滑块，拖动到最右边获取验证码",
                                    _yesTEXT: "验证码已发送至您的手机，请注意查收",
                                    _error300: "哎呀，出错了，点击<a href=\"javascript:__nc.reset()\">刷新</a>再来一次",
                                    _errorNetwork: "网络不给力，请<a href=\"javascript:__nc.reset()\">点击刷新</a>",
                                })
                            </script>

                        </div>
                        <div class="modal-footer">
                            <button type="button" class="btn btn-default" data-dismiss="modal">关闭
                            </button>
                            <!--<button type="button" class="btn btn-primary">-->
                            <!--完成-->
                            <!--</button>-->
                        </div>
                    </div><!-- /.modal-content -->
                </div><!-- /.modal -->
            </div>



            <div class="row">
                <div class="col-md-5 col-md-push-1 animate-box">

                    <div class="fh5co-contact-info">
                        <h3>报名须知</h3>
                        ${article.content}
                    </div>

                </div>
                <div class="col-md-6 animate-box">
                    <h3>在线报名</h3>
                    @if(!isEmpty(reg.paidPrice) && reg.paidPrice>0){
                    <p style="color:red">您已经成功支付 ¥${reg.paidPrice}，如需修改报名信息请联系会务组（18008467771）</p>
                    @}
                    <form action="/front/registration/prepay" method="post" onsubmit="return check();">
                        <input type="hidden" name="id" id="id" value="${reg.id!}">
                        <input type="hidden" name="openId" id="openId" value="${reg.openId!}" >
                        <div class="row form-group">
                            <div class="col-md-6">
                                <label for="name">联系人姓名</label>
                                <input type="text" id="name" name="name" value="${reg.name!}" class="form-control" required="required" placeholder="请填写联系人姓名...">
                            </div>
                            <div class="col-md-6">
                                <label for="postcode">邮编</label>
                                <input type="number" id="postcode" name="postcode" value="${reg.postcode!}" class="form-control" placeholder="请填写邮编...">
                            </div>
                        </div>

                        <div class="row form-group">
                            <div class="col-md-12">
                                <label for="address">地址</label>
                                <input type="text" name="address" id="address" class="form-control" value="${reg.address!}" placeholder="请填写地址...">
                            </div>
                        </div>


                        <div class="row form-group">
                            <div class="col-md-12">
                                <label for="org">单位</label>
                                <input type="text" id="org"  name="org" required="required" value="${reg.org!}"  class="form-control" placeholder="请填写单位...">
                            </div>
                        </div>

                        <div class="row form-group">
                            <div class="col-md-12">
                                <label for="tel">手机</label>
                                <input type="number" name="tel" id="tel" required="required" value="${reg.tel!}"  class="form-control" placeholder="请填写电话...">
                            </div>
                        </div>

                        <div class="row form-group">
                            <div class="col-md-12">
                                <label for="email">邮箱</label>
                                <input type="text" name="email" id="email" required="required" value="${reg.email!}"  class="form-control" placeholder="请填写邮箱...">
                            </div>
                        </div>

                        <div class="row form-group">
                            <div class="col-md-12">
                                <label style="width: 100%;">参会人员<span style="float: right;color: #F73859;" onclick="insert()">增加</span></label>
                                <div style="clear:both"></div>
                                <div id="person">
                                    @if(isEmpty(reg)){
                                        <div id="person0" style="margin-bottom: 30px;">
                                            <input type="text" name="name0" id="name0" value="${user.name!}" class="form-control" style="margin-bottom: 8px;width: 33%;float: left;" required="required" placeholder="姓名...">
                                            <input type="checkbox" name="student0" id="student0" value="${user.student!}"  class="form-control" style="margin-top: -4px;float: left;width: 15px;margin-left: 15px;">是否学生
                                            <input type="radio" value="先生" name="sex0" id="sex0" style="margin-left: 15px;margin-top: 15px;" required="required">
                                            先生
                                            <input type="radio" value="女士" name="sex0" required="required"
                                            >
                                            女士
                                            <input type="text" name="title0" value="${user.title!}" id="title0" style="margin-bottom: 8px;" class="form-control" placeholder="参会人员职务职称...">
                                            <input type="text" name="tel0" value="${user.tel!}" id="tel0" style="margin-bottom: 8px;" class="form-control" required="required" placeholder="参会人员手机号码...">
                                            <input type="text" name="email0" value="${user.email!}" id="email0" class="form-control" required="required" placeholder="参会人员QQ/邮箱...">
                                        </div>
                                    @}
                                    @for(user in person!){
                                    <div id="person${userLP.index}" style="margin-bottom: 30px;">
                                        <input type="text" name="name${userLP.index}" id="name${userLP.index}" value="${user.name!}" class="form-control" style="margin-bottom: 8px;width: 33%;float: left;" required="required" placeholder="姓名...">
                                        <input type="checkbox" name="student${userLP.index}" id="student${userLP.index}" ${user.student==1?'checked':''}  class="form-control" style="margin-top: -4px;float: left;width: 15px;margin-left: 15px;">是否学生
                                        <input type="radio" value="先生" name="sex${userLP.index}" id="sex${userLP.index}" style="margin-left: 15px;margin-top: 15px;" required="required" ${user.sex=='先生'?'checked':''}>
                                        先生
                                        <input type="radio" value="女士" name="sex${userLP.index}" required="required" ${user.sex=='女士'?'checked':''}
                                        >
                                        女士
                                        <span style="${userLP.index==1?'display:none':''};float: right;color: #F73859;" onclick="$('#person${userLP.index}').remove()">删除</span>
                                        <input type="text" name="title${userLP.index}" value="${user.title!}" id="title${userLP.index}" style="margin-bottom: 8px;" class="form-control" placeholder="参会人员职务职称...">
                                        <input type="text" name="tel${userLP.index}" value="${user.tel!}" id="tel${userLP.index}" style="margin-bottom: 8px;" class="form-control" required="required" placeholder="参会人员手机号码...">
                                        <input type="text" name="email${userLP.index}" value="${user.email!}" id="email${userLP.index}" class="form-control" required="required" placeholder="参会人员QQ/邮箱...">
                                    </div>
                                    @}
                                </div>
                            </div>
                        </div>


                        <div class="row form-group" style="font-size: 16px;">
                            <div class="col-md-12">
                                <label >会议酒店：</label>
                                <div style="clear:both"></div>
                                行政套房 648 元/间
                                <div style="float:right">共<select name="room1">
                                    @if(!isEmpty(reg.room1) && reg.room1>0){
                                        <option value="${reg.room1}" selected>${reg.room1}</option>
                                    @}

                                    @for(var i in range(0,3)) {
                                    <option value="${i}">${i}</option>
                                    @}
                                </select>间</div>

                                <br>普通套房 548 元/间
                                <div style="float:right">共<select name="room2">
                                    @if(!isEmpty(reg.room2) && reg.room2>0){
                                    <option value="${reg.room2}" selected>${reg.room2}</option>
                                    @}

                                    @for(var i in range(0,6)) {
                                    <option value="${i}">${i}</option>
                                    @}
                                </select>间</div>

                                <br>行政大床/双床 548 元/间
                                <div style="float:right"> 大床共<select name="room3">
                                    @if(!isEmpty(reg.room3) && reg.room3>0){
                                    <option value="${reg.room3}" selected>${reg.room3}</option>
                                    @}
                                    <option value="0">0</option>
                                </select>间 双床共<select name="room4">
                                    @if(!isEmpty(reg.room4) && reg.room4>0){
                                    <option value="${reg.room4}" selected>${reg.room4}</option>
                                    @}
                                    <option value="0">0</option>
                                </select>间</div>

                                <br>高级大床/双床 328 元/间
                                <div style="float:right"> 大床共<select name="room5">
                                    @if(!isEmpty(reg.room5)  && reg.room5>0){
                                    <option value="${reg.room5}" selected>${reg.room5}</option>
                                    @}
                                    <option value="0">0</option>
                                </select>间 双床共<select name="room6">
                                    @if(!isEmpty(reg.room6) && reg.room6>0){
                                    <option value="${reg.room1}" selected>${reg.room6}</option>
                                    @}
                                    @for(var i in range(0,35)) {
                                    <option value="${i}">${i}</option>
                                    @}
                                </select>间</div>

                                <br>高级双床拼房 164 元/位
                                <div style="float:right">共<select name="room7">
                                    @if(!isEmpty(reg.room7) && reg.room7>0){
                                    <option value="${reg.room1}" selected>${reg.room7}</option>
                                    @}
                                    @for(var i in range(0,34)) {
                                    <option value="${i}">${i}</option>
                                    @}
                                </select>床</div>
                            </div>
                        </div>


                        <div class="row form-group" style="font-size: 16px;">
                            <div class="col-md-12">
                                <label>栖涧里创想酒店（距离会议酒店步行5分钟）：</label>
                                <div style="clear:both"></div>

                                标准大床房 228 元/间
                                <div style="float:right">共<select name="room8">
                                    @if(!isEmpty(reg.room8) && reg.room8>0){
                                    <option value="${reg.room8}" selected>${reg.room8}</option>
                                    @}
                                    @for(var i in range(0,15)) {
                                    <option value="${i}">${i}</option>
                                    @}
                                </select>间</div>

                                <br>标准双床房 248 元/间
                                <div style="float:right">共<select name="room9">
                                    @if(!isEmpty(reg.room9) && reg.room9>0){
                                    <option value="${reg.room1}" selected>${reg.room9}</option>
                                    @}
                                    @for(var i in range(0,11)) {
                                    <option value="${i}">${i}</option>
                                    @}
                                </select>间</div>

                                <br>标准双床拼房 124 元/位
                                <div style="float:right">共<select name="room10">
                                    @if(!isEmpty(reg.room10) && reg.room10>0){
                                    <option value="${reg.room10}" selected>${reg.room10}</option>
                                    @}
                                    @for(var i in range(0,38)) {
                                    <option value="${i}">${i}</option>
                                    @}
                                </select>床</div>
                            </div>
                        </div>

                        <div class="row form-group">
                            <div class="col-md-12">
                                <label for="org">开票单位</label>
                                <input type="text" id="taxname" required="required" value="${reg.taxname!}"  name="taxname"  class="form-control" placeholder="请填写开票单位...">
                            </div>
                        </div>

                        <div class="row form-group">
                            <div class="col-md-12">
                                <label for="tel">纳税人识别号</label>
                                <input type="text" name="taxcode" required="required" value="${reg.taxcode!}"  id="taxcode" class="form-control" placeholder="请填写纳税人识别号...">
                            </div>
                        </div>


                        <div class="row form-group">
                            <div class="col-md-12">
                                <label for="ext">备注</label>
                                <textarea name="ext" id="ext" cols="30" rows="10" class="form-control" placeholder="请填写备注...">${reg.ext!}</textarea>
                            </div>
                        </div>
                        <div class="form-group">
                            <input type="submit" value="立即报名" class="btn btn-lg btn-primary">

                            @if(isEmpty(person)){
                            <input type="button" onclick="$('#myModal').modal('show')" value="查看/修改报名信息" class="btn btn-lg btn-primary">
                            @}
                        </div>
                    </form>
                </div>
            </div>

        </div>
    </div>

    <script type="application/javascript">
        var index = 1;
        @if(!isEmpty(person)){
            index = ${person.~size};
        @}
        function insert() {
            index ++;
            var str = '<p></p><div id="person'+index+'"><input type="text" required="required" name="name'+index+'" id="name'+index+'" class="form-control" style="margin-bottom: 8px;width: 33%;float: left;" placeholder="参会人员姓名...">\n' +
                '\n' +
                '<input type="checkbox" name="student'+index+'" id="student'+index+'" class="form-control" style="margin-top: -4px;float: left;width: 15px;margin-left: 15px;">是否学生\n' +
                '<input type="radio" required="required" value="先生" name="sex'+index+'" id="sex'+index+'" style="margin-left: 15px;margin-top: 15px;" >\n' +
                '                                    先生\n' +
                '                                    <input type="radio" required="required" value="女士" name="sex'+index+'" >\n' +
                '                                    女士\n' +
                '                                    <span style="float: right;color: #F73859;" onclick="$(\'#person'+index+'\').remove()">删除</span>\n' +
                '                                    <input type="text" name="title'+index+'" id="title'+index+'" style="margin-bottom: 8px;" class="form-control" placeholder="参会人员职务职称...">\n' +
                '                                    <input type="text" required="required" name="tel'+index+'" id="tel'+index+'" style="margin-bottom: 8px;" class="form-control" placeholder="参会人员手机号码...">\n' +
                '                                    <input type="text" required="required" name="email'+index+'" id="email'+index+'" class="form-control" placeholder="参会人员QQ/邮箱..."></div>';

            $('#person').append(str);
        }

        var tid;

        /* 刷新查询 */
        function refreshQuery(){
            var openid = $.ajax({url:"/front/registration/bind/result?tid="+tid,async:false}).responseText;
            openid =openid.replace(/"/g, "");
            if(openid){
                $("#openId").val(openid);
                $("form").submit();
            }
        }



        function check(){
            @if(!isEmpty(reg.paidPrice) && reg.paidPrice>0){
                alert('您已经付款，请联系会务组（18008467771）进行修改！');
                return false;
            @}


            tid = new Date().getTime()+"";
            tid=tid.slice(tid.length - 6,tid.length);
            // debugger;
            if(!$('#name1').val() && !$('#tel').val()){
                return false;
            }else{
                if($("#openId").val()||!IsPC()||true){
                    return true;
                }else {
                    $('#myModal').on('show.bs.modal', function () {
                        $('#myModalContent').html('请扫描（长按）二维码关注公众号，后续将可以微信登录查询报名信息' +
                            '<br><img id="qrcode" style="width: 200px;" src=' + $.ajax({
                                url: "/front/registration/qrcode?tid=" + tid,
                                async: false
                            }).responseText + '/>');

                        setInterval('refreshQuery()', 1000);
                    });

                    $("#myModal").modal({
                        keyboard: true//当按下esc键时，modal框消失
                    });

                    return false;
                }
            }
        }
    </script>
    </script>

    @include("/common/front/_footer.html"){}
    </div>

    <div class="gototop js-top">
        <a href="#" class="js-gotop"><i class="icon-arrow-up"></i></a>
    </div>

    <!-- jQuery -->
    <script src="/static/front/js/jquery.min.js"></script>
    <!-- jQuery Easing -->
    <script src="/static/front/js/jquery.easing.1.3.js"></script>
    <!-- Bootstrap -->
    <script src="/static/front/js/bootstrap.min.js"></script>
    <!-- Waypoints -->
    <script src="/static/front/js/jquery.waypoints.min.js"></script>
    <!-- countTo -->
    <script src="/static/front/js/jquery.countTo.js"></script>
    <!-- Magnific Popup -->
    <script src="/static/front/js/jquery.magnific-popup.min.js"></script>
    <script src="/static/front/js/magnific-popup-options.js"></script>
    <!-- Stellar -->
    <script src="/static/front/js/jquery.stellar.min.js"></script>
    <!-- Main -->
    <script src="/static/front/js/main.js"></script>

</body>
</html>

